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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // o rbp: our caller's frame pointer | 112 // o rbp: our caller's frame pointer |
113 // o rsp: stack pointer (pointing to return address) | 113 // o rsp: stack pointer (pointing to return address) |
114 // | 114 // |
115 // The function builds a JS frame. Please see JavaScriptFrameConstants in | 115 // The function builds a JS frame. Please see JavaScriptFrameConstants in |
116 // frames-x64.h for its layout. | 116 // frames-x64.h for its layout. |
117 void FullCodeGenerator::Generate() { | 117 void FullCodeGenerator::Generate() { |
118 CompilationInfo* info = info_; | 118 CompilationInfo* info = info_; |
119 handler_table_ = | 119 handler_table_ = |
120 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED); | 120 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED); |
121 profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell( | 121 profiling_counter_ = isolate()->factory()->NewJSGlobalPropertyCell( |
122 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget))); | 122 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); |
123 SetFunctionPosition(function()); | 123 SetFunctionPosition(function()); |
124 Comment cmnt(masm_, "[ function compiled by full code generator"); | 124 Comment cmnt(masm_, "[ function compiled by full code generator"); |
125 | 125 |
126 ProfileEntryHookStub::MaybeCallEntryHook(masm_); | 126 ProfileEntryHookStub::MaybeCallEntryHook(masm_); |
127 | 127 |
128 #ifdef DEBUG | 128 #ifdef DEBUG |
129 if (strlen(FLAG_stop_at) > 0 && | 129 if (strlen(FLAG_stop_at) > 0 && |
130 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { | 130 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { |
131 __ int3(); | 131 __ int3(); |
132 } | 132 } |
(...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2297 // We want to verify that RecordJSReturnSite gets called on all paths | 2297 // We want to verify that RecordJSReturnSite gets called on all paths |
2298 // through this function. Avoid early returns. | 2298 // through this function. Avoid early returns. |
2299 expr->return_is_recorded_ = false; | 2299 expr->return_is_recorded_ = false; |
2300 #endif | 2300 #endif |
2301 | 2301 |
2302 Comment cmnt(masm_, "[ Call"); | 2302 Comment cmnt(masm_, "[ Call"); |
2303 Expression* callee = expr->expression(); | 2303 Expression* callee = expr->expression(); |
2304 VariableProxy* proxy = callee->AsVariableProxy(); | 2304 VariableProxy* proxy = callee->AsVariableProxy(); |
2305 Property* property = callee->AsProperty(); | 2305 Property* property = callee->AsProperty(); |
2306 | 2306 |
2307 if (proxy != NULL && proxy->var()->is_possibly_eval()) { | 2307 if (proxy != NULL && proxy->var()->is_possibly_eval(isolate())) { |
2308 // In a call to eval, we first call %ResolvePossiblyDirectEval to | 2308 // In a call to eval, we first call %ResolvePossiblyDirectEval to |
2309 // resolve the function we need to call and the receiver of the call. | 2309 // resolve the function we need to call and the receiver of the call. |
2310 // Then we call the resolved function using the given arguments. | 2310 // Then we call the resolved function using the given arguments. |
2311 ZoneList<Expression*>* args = expr->arguments(); | 2311 ZoneList<Expression*>* args = expr->arguments(); |
2312 int arg_count = args->length(); | 2312 int arg_count = args->length(); |
2313 { PreservePositionScope pos_scope(masm()->positions_recorder()); | 2313 { PreservePositionScope pos_scope(masm()->positions_recorder()); |
2314 VisitForStackValue(callee); | 2314 VisitForStackValue(callee); |
2315 __ PushRoot(Heap::kUndefinedValueRootIndex); // Reserved receiver slot. | 2315 __ PushRoot(Heap::kUndefinedValueRootIndex); // Reserved receiver slot. |
2316 | 2316 |
2317 // Push the arguments. | 2317 // Push the arguments. |
(...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4492 *context_length = 0; | 4492 *context_length = 0; |
4493 return previous_; | 4493 return previous_; |
4494 } | 4494 } |
4495 | 4495 |
4496 | 4496 |
4497 #undef __ | 4497 #undef __ |
4498 | 4498 |
4499 } } // namespace v8::internal | 4499 } } // namespace v8::internal |
4500 | 4500 |
4501 #endif // V8_TARGET_ARCH_X64 | 4501 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |