OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 if (FLAG_trace) { | 238 if (FLAG_trace) { |
239 __ CallRuntime(Runtime::kTraceEnter, 0); | 239 __ CallRuntime(Runtime::kTraceEnter, 0); |
240 } | 240 } |
241 | 241 |
242 // Visit the declarations and body unless there is an illegal | 242 // Visit the declarations and body unless there is an illegal |
243 // redeclaration. | 243 // redeclaration. |
244 if (scope()->HasIllegalRedeclaration()) { | 244 if (scope()->HasIllegalRedeclaration()) { |
245 Comment cmnt(masm_, "[ Declarations"); | 245 Comment cmnt(masm_, "[ Declarations"); |
246 scope()->VisitIllegalRedeclaration(this); | 246 scope()->VisitIllegalRedeclaration(this); |
247 } else { | 247 } else { |
| 248 PrepareForBailoutForId(AstNode::kFunctionEntryId, NO_REGISTERS); |
248 { Comment cmnt(masm_, "[ Declarations"); | 249 { Comment cmnt(masm_, "[ Declarations"); |
249 // For named function expressions, declare the function name as a | 250 // For named function expressions, declare the function name as a |
250 // constant. | 251 // constant. |
251 if (scope()->is_function_scope() && scope()->function() != NULL) { | 252 if (scope()->is_function_scope() && scope()->function() != NULL) { |
252 EmitDeclaration(scope()->function(), Variable::CONST, NULL); | 253 EmitDeclaration(scope()->function(), Variable::CONST, NULL); |
253 } | 254 } |
254 VisitDeclarations(scope()->declarations()); | 255 VisitDeclarations(scope()->declarations()); |
255 } | 256 } |
256 | 257 |
257 { Comment cmnt(masm_, "[ Stack check"); | 258 { Comment cmnt(masm_, "[ Stack check"); |
258 PrepareForBailoutForId(AstNode::kFunctionEntryId, NO_REGISTERS); | 259 PrepareForBailoutForId(AstNode::kDeclarationsId, NO_REGISTERS); |
259 Label ok; | 260 Label ok; |
260 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); | 261 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); |
261 __ j(above_equal, &ok, Label::kNear); | 262 __ j(above_equal, &ok, Label::kNear); |
262 StackCheckStub stub; | 263 StackCheckStub stub; |
263 __ CallStub(&stub); | 264 __ CallStub(&stub); |
264 __ bind(&ok); | 265 __ bind(&ok); |
265 } | 266 } |
266 | 267 |
267 { Comment cmnt(masm_, "[ Body"); | 268 { Comment cmnt(masm_, "[ Body"); |
268 ASSERT(loop_depth() == 0); | 269 ASSERT(loop_depth() == 0); |
(...skipping 3872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4141 __ jmp(rdx); | 4142 __ jmp(rdx); |
4142 } | 4143 } |
4143 | 4144 |
4144 | 4145 |
4145 #undef __ | 4146 #undef __ |
4146 | 4147 |
4147 | 4148 |
4148 } } // namespace v8::internal | 4149 } } // namespace v8::internal |
4149 | 4150 |
4150 #endif // V8_TARGET_ARCH_X64 | 4151 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |