Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 10824084: Fix deserializer to understand direct pointers from code to cell payloads. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2357 ZoneList<Expression*>* args = expr->arguments(); 2357 ZoneList<Expression*>* args = expr->arguments();
2358 int arg_count = args->length(); 2358 int arg_count = args->length();
2359 { PreservePositionScope scope(masm()->positions_recorder()); 2359 { PreservePositionScope scope(masm()->positions_recorder());
2360 for (int i = 0; i < arg_count; i++) { 2360 for (int i = 0; i < arg_count; i++) {
2361 VisitForStackValue(args->at(i)); 2361 VisitForStackValue(args->at(i));
2362 } 2362 }
2363 } 2363 }
2364 // Record source position for debugger. 2364 // Record source position for debugger.
2365 SetSourcePosition(expr->position()); 2365 SetSourcePosition(expr->position());
2366 2366
2367 // Record call targets in unoptimized code, but not in the snapshot. 2367 // Record call targets in unoptimized code.
2368 if (!Serializer::enabled()) { 2368 flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
2369 flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET); 2369 Handle<Object> uninitialized =
2370 Handle<Object> uninitialized = 2370 TypeFeedbackCells::UninitializedSentinel(isolate());
2371 TypeFeedbackCells::UninitializedSentinel(isolate()); 2371 Handle<JSGlobalPropertyCell> cell =
2372 Handle<JSGlobalPropertyCell> cell = 2372 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized);
2373 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized); 2373 RecordTypeFeedbackCell(expr->id(), cell);
2374 RecordTypeFeedbackCell(expr->id(), cell); 2374 __ mov(r2, Operand(cell));
2375 __ mov(r2, Operand(cell));
2376 }
2377 2375
2378 CallFunctionStub stub(arg_count, flags); 2376 CallFunctionStub stub(arg_count, flags);
2379 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2377 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2380 __ CallStub(&stub); 2378 __ CallStub(&stub);
2381 RecordJSReturnSite(expr); 2379 RecordJSReturnSite(expr);
2382 // Restore context register. 2380 // Restore context register.
2383 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2381 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2384 context()->DropAndPlug(1, r0); 2382 context()->DropAndPlug(1, r0);
2385 } 2383 }
2386 2384
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 } 2554 }
2557 2555
2558 // Call the construct call builtin that handles allocation and 2556 // Call the construct call builtin that handles allocation and
2559 // constructor invocation. 2557 // constructor invocation.
2560 SetSourcePosition(expr->position()); 2558 SetSourcePosition(expr->position());
2561 2559
2562 // Load function and argument count into r1 and r0. 2560 // Load function and argument count into r1 and r0.
2563 __ mov(r0, Operand(arg_count)); 2561 __ mov(r0, Operand(arg_count));
2564 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); 2562 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize));
2565 2563
2566 // Record call targets in unoptimized code, but not in the snapshot. 2564 // Record call targets in unoptimized code.
2567 CallFunctionFlags flags; 2565 Handle<Object> uninitialized =
2568 if (!Serializer::enabled()) { 2566 TypeFeedbackCells::UninitializedSentinel(isolate());
2569 flags = RECORD_CALL_TARGET; 2567 Handle<JSGlobalPropertyCell> cell =
2570 Handle<Object> uninitialized = 2568 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized);
2571 TypeFeedbackCells::UninitializedSentinel(isolate()); 2569 RecordTypeFeedbackCell(expr->id(), cell);
2572 Handle<JSGlobalPropertyCell> cell = 2570 __ mov(r2, Operand(cell));
2573 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized);
2574 RecordTypeFeedbackCell(expr->id(), cell);
2575 __ mov(r2, Operand(cell));
2576 } else {
2577 flags = NO_CALL_FUNCTION_FLAGS;
2578 }
2579 2571
2580 CallConstructStub stub(flags); 2572 CallConstructStub stub(RECORD_CALL_TARGET);
2581 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 2573 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
2582 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 2574 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
2583 context()->Plug(r0); 2575 context()->Plug(r0);
2584 } 2576 }
2585 2577
2586 2578
2587 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { 2579 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) {
2588 ZoneList<Expression*>* args = expr->arguments(); 2580 ZoneList<Expression*>* args = expr->arguments();
2589 ASSERT(args->length() == 1); 2581 ASSERT(args->length() == 1);
2590 2582
(...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after
4578 *context_length = 0; 4570 *context_length = 0;
4579 return previous_; 4571 return previous_;
4580 } 4572 }
4581 4573
4582 4574
4583 #undef __ 4575 #undef __
4584 4576
4585 } } // namespace v8::internal 4577 } } // namespace v8::internal
4586 4578
4587 #endif // V8_TARGET_ARCH_ARM 4579 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/heap.cc » ('j') | src/ia32/full-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698