| OLD | NEW |
| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // o sp: stack pointer | 123 // o sp: stack pointer |
| 124 // o lr: return address | 124 // o lr: return address |
| 125 // | 125 // |
| 126 // The function builds a JS frame. Please see JavaScriptFrameConstants in | 126 // The function builds a JS frame. Please see JavaScriptFrameConstants in |
| 127 // frames-arm.h for its layout. | 127 // frames-arm.h for its layout. |
| 128 void FullCodeGenerator::Generate() { | 128 void FullCodeGenerator::Generate() { |
| 129 CompilationInfo* info = info_; | 129 CompilationInfo* info = info_; |
| 130 handler_table_ = | 130 handler_table_ = |
| 131 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED); | 131 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED); |
| 132 profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell( | 132 profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell( |
| 133 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget))); | 133 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); |
| 134 SetFunctionPosition(function()); | 134 SetFunctionPosition(function()); |
| 135 Comment cmnt(masm_, "[ function compiled by full code generator"); | 135 Comment cmnt(masm_, "[ function compiled by full code generator"); |
| 136 | 136 |
| 137 ProfileEntryHookStub::MaybeCallEntryHook(masm_); | 137 ProfileEntryHookStub::MaybeCallEntryHook(masm_); |
| 138 | 138 |
| 139 #ifdef DEBUG | 139 #ifdef DEBUG |
| 140 if (strlen(FLAG_stop_at) > 0 && | 140 if (strlen(FLAG_stop_at) > 0 && |
| 141 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { | 141 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { |
| 142 __ stop("stop-at"); | 142 __ stop("stop-at"); |
| 143 } | 143 } |
| (...skipping 2226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2370 // We want to verify that RecordJSReturnSite gets called on all paths | 2370 // We want to verify that RecordJSReturnSite gets called on all paths |
| 2371 // through this function. Avoid early returns. | 2371 // through this function. Avoid early returns. |
| 2372 expr->return_is_recorded_ = false; | 2372 expr->return_is_recorded_ = false; |
| 2373 #endif | 2373 #endif |
| 2374 | 2374 |
| 2375 Comment cmnt(masm_, "[ Call"); | 2375 Comment cmnt(masm_, "[ Call"); |
| 2376 Expression* callee = expr->expression(); | 2376 Expression* callee = expr->expression(); |
| 2377 VariableProxy* proxy = callee->AsVariableProxy(); | 2377 VariableProxy* proxy = callee->AsVariableProxy(); |
| 2378 Property* property = callee->AsProperty(); | 2378 Property* property = callee->AsProperty(); |
| 2379 | 2379 |
| 2380 if (proxy != NULL && proxy->var()->is_possibly_eval()) { | 2380 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) { |
| 2381 // In a call to eval, we first call %ResolvePossiblyDirectEval to | 2381 // In a call to eval, we first call %ResolvePossiblyDirectEval to |
| 2382 // resolve the function we need to call and the receiver of the | 2382 // resolve the function we need to call and the receiver of the |
| 2383 // call. Then we call the resolved function using the given | 2383 // call. Then we call the resolved function using the given |
| 2384 // arguments. | 2384 // arguments. |
| 2385 ZoneList<Expression*>* args = expr->arguments(); | 2385 ZoneList<Expression*>* args = expr->arguments(); |
| 2386 int arg_count = args->length(); | 2386 int arg_count = args->length(); |
| 2387 | 2387 |
| 2388 { PreservePositionScope pos_scope(masm()->positions_recorder()); | 2388 { PreservePositionScope pos_scope(masm()->positions_recorder()); |
| 2389 VisitForStackValue(callee); | 2389 VisitForStackValue(callee); |
| 2390 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); | 2390 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); |
| (...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4521 *context_length = 0; | 4521 *context_length = 0; |
| 4522 return previous_; | 4522 return previous_; |
| 4523 } | 4523 } |
| 4524 | 4524 |
| 4525 | 4525 |
| 4526 #undef __ | 4526 #undef __ |
| 4527 | 4527 |
| 4528 } } // namespace v8::internal | 4528 } } // namespace v8::internal |
| 4529 | 4529 |
| 4530 #endif // V8_TARGET_ARCH_ARM | 4530 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |