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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // o sp: stack pointer | 132 // o sp: stack pointer |
133 // o ra: return address | 133 // o ra: return address |
134 // | 134 // |
135 // The function builds a JS frame. Please see JavaScriptFrameConstants in | 135 // The function builds a JS frame. Please see JavaScriptFrameConstants in |
136 // frames-mips.h for its layout. | 136 // frames-mips.h for its layout. |
137 void FullCodeGenerator::Generate() { | 137 void FullCodeGenerator::Generate() { |
138 CompilationInfo* info = info_; | 138 CompilationInfo* info = info_; |
139 handler_table_ = | 139 handler_table_ = |
140 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED); | 140 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED); |
141 profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell( | 141 profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell( |
142 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget))); | 142 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); |
143 SetFunctionPosition(function()); | 143 SetFunctionPosition(function()); |
144 Comment cmnt(masm_, "[ function compiled by full code generator"); | 144 Comment cmnt(masm_, "[ function compiled by full code generator"); |
145 | 145 |
146 ProfileEntryHookStub::MaybeCallEntryHook(masm_); | 146 ProfileEntryHookStub::MaybeCallEntryHook(masm_); |
147 | 147 |
148 #ifdef DEBUG | 148 #ifdef DEBUG |
149 if (strlen(FLAG_stop_at) > 0 && | 149 if (strlen(FLAG_stop_at) > 0 && |
150 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { | 150 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { |
151 __ stop("stop-at"); | 151 __ stop("stop-at"); |
152 } | 152 } |
(...skipping 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2398 // We want to verify that RecordJSReturnSite gets called on all paths | 2398 // We want to verify that RecordJSReturnSite gets called on all paths |
2399 // through this function. Avoid early returns. | 2399 // through this function. Avoid early returns. |
2400 expr->return_is_recorded_ = false; | 2400 expr->return_is_recorded_ = false; |
2401 #endif | 2401 #endif |
2402 | 2402 |
2403 Comment cmnt(masm_, "[ Call"); | 2403 Comment cmnt(masm_, "[ Call"); |
2404 Expression* callee = expr->expression(); | 2404 Expression* callee = expr->expression(); |
2405 VariableProxy* proxy = callee->AsVariableProxy(); | 2405 VariableProxy* proxy = callee->AsVariableProxy(); |
2406 Property* property = callee->AsProperty(); | 2406 Property* property = callee->AsProperty(); |
2407 | 2407 |
2408 if (proxy != NULL && proxy->var()->is_possibly_eval()) { | 2408 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) { |
2409 // In a call to eval, we first call %ResolvePossiblyDirectEval to | 2409 // In a call to eval, we first call %ResolvePossiblyDirectEval to |
2410 // resolve the function we need to call and the receiver of the | 2410 // resolve the function we need to call and the receiver of the |
2411 // call. Then we call the resolved function using the given | 2411 // call. Then we call the resolved function using the given |
2412 // arguments. | 2412 // arguments. |
2413 ZoneList<Expression*>* args = expr->arguments(); | 2413 ZoneList<Expression*>* args = expr->arguments(); |
2414 int arg_count = args->length(); | 2414 int arg_count = args->length(); |
2415 | 2415 |
2416 { PreservePositionScope pos_scope(masm()->positions_recorder()); | 2416 { PreservePositionScope pos_scope(masm()->positions_recorder()); |
2417 VisitForStackValue(callee); | 2417 VisitForStackValue(callee); |
2418 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); | 2418 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4571 *context_length = 0; | 4571 *context_length = 0; |
4572 return previous_; | 4572 return previous_; |
4573 } | 4573 } |
4574 | 4574 |
4575 | 4575 |
4576 #undef __ | 4576 #undef __ |
4577 | 4577 |
4578 } } // namespace v8::internal | 4578 } } // namespace v8::internal |
4579 | 4579 |
4580 #endif // V8_TARGET_ARCH_MIPS | 4580 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |