diff options
| author | Ben Murdoch <benm@google.com> | 2010-06-15 11:15:29 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2010-06-15 11:22:44 +0100 |
| commit | 7f4d5bd8c03935e2c0cd412e561b8fc5a6a880ae (patch) | |
| tree | 59a0ccf5c23a6f5890b81f4a6aa99b568c8115f2 /src/codegen.cc | |
| parent | f7060e27768c550ace7ec48ad8c093466db52dfa (diff) | |
| download | android_external_v8-7f4d5bd8c03935e2c0cd412e561b8fc5a6a880ae.tar.gz android_external_v8-7f4d5bd8c03935e2c0cd412e561b8fc5a6a880ae.tar.bz2 android_external_v8-7f4d5bd8c03935e2c0cd412e561b8fc5a6a880ae.zip | |
Update V8 to r4851 as required by WebKit r61121
Change-Id: Ib01b7c8e38d5b82b254192fc06365aa5b85780c5
Diffstat (limited to 'src/codegen.cc')
| -rw-r--r-- | src/codegen.cc | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/src/codegen.cc b/src/codegen.cc index f89399a9..686e173e 100644 --- a/src/codegen.cc +++ b/src/codegen.cc @@ -254,10 +254,28 @@ Handle<Code> CodeGenerator::ComputeCallInitialize( // that it needs so we need to ensure it is generated already. ComputeCallInitialize(argc, NOT_IN_LOOP); } - CALL_HEAP_FUNCTION(StubCache::ComputeCallInitialize(argc, in_loop), Code); + CALL_HEAP_FUNCTION( + StubCache::ComputeCallInitialize(argc, in_loop, Code::CALL_IC), + Code); } +Handle<Code> CodeGenerator::ComputeKeyedCallInitialize( + int argc, + InLoopFlag in_loop) { + if (in_loop == IN_LOOP) { + // Force the creation of the corresponding stub outside loops, + // because it may be used when clearing the ICs later - it is + // possible for a series of IC transitions to lose the in-loop + // information, and the IC clearing code can't generate a stub + // that it needs so we need to ensure it is generated already. + ComputeKeyedCallInitialize(argc, NOT_IN_LOOP); + } + CALL_HEAP_FUNCTION( + StubCache::ComputeCallInitialize(argc, in_loop, Code::KEYED_CALL_IC), + Code); +} + void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) { int length = declarations->length(); int globals = 0; @@ -397,32 +415,41 @@ CodeGenerator::ConditionAnalysis CodeGenerator::AnalyzeCondition( } -void CodeGenerator::RecordPositions(MacroAssembler* masm, int pos) { +bool CodeGenerator::RecordPositions(MacroAssembler* masm, + int pos, + bool right_here) { if (pos != RelocInfo::kNoPosition) { masm->RecordStatementPosition(pos); masm->RecordPosition(pos); + if (right_here) { + return masm->WriteRecordedPositions(); + } } + return false; } void CodeGenerator::CodeForFunctionPosition(FunctionLiteral* fun) { - if (FLAG_debug_info) RecordPositions(masm(), fun->start_position()); + if (FLAG_debug_info) RecordPositions(masm(), fun->start_position(), false); } void CodeGenerator::CodeForReturnPosition(FunctionLiteral* fun) { - if (FLAG_debug_info) RecordPositions(masm(), fun->end_position()); + if (FLAG_debug_info) RecordPositions(masm(), fun->end_position(), false); } void CodeGenerator::CodeForStatementPosition(Statement* stmt) { - if (FLAG_debug_info) RecordPositions(masm(), stmt->statement_pos()); + if (FLAG_debug_info) RecordPositions(masm(), stmt->statement_pos(), false); } + void CodeGenerator::CodeForDoWhileConditionPosition(DoWhileStatement* stmt) { - if (FLAG_debug_info) RecordPositions(masm(), stmt->condition_position()); + if (FLAG_debug_info) + RecordPositions(masm(), stmt->condition_position(), false); } + void CodeGenerator::CodeForSourcePosition(int pos) { if (FLAG_debug_info && pos != RelocInfo::kNoPosition) { masm()->RecordPosition(pos); |
