| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 __ CallRuntime(Runtime::kTraceEnter, 0); | 248 __ CallRuntime(Runtime::kTraceEnter, 0); |
| 249 } | 249 } |
| 250 | 250 |
| 251 // Visit the declarations and body unless there is an illegal | 251 // Visit the declarations and body unless there is an illegal |
| 252 // redeclaration. | 252 // redeclaration. |
| 253 if (scope()->HasIllegalRedeclaration()) { | 253 if (scope()->HasIllegalRedeclaration()) { |
| 254 Comment cmnt(masm_, "[ Declarations"); | 254 Comment cmnt(masm_, "[ Declarations"); |
| 255 scope()->VisitIllegalRedeclaration(this); | 255 scope()->VisitIllegalRedeclaration(this); |
| 256 | 256 |
| 257 } else { | 257 } else { |
| 258 PrepareForBailoutForId(AstNode::kFunctionEntryId, NO_REGISTERS); |
| 258 { Comment cmnt(masm_, "[ Declarations"); | 259 { Comment cmnt(masm_, "[ Declarations"); |
| 259 // For named function expressions, declare the function name as a | 260 // For named function expressions, declare the function name as a |
| 260 // constant. | 261 // constant. |
| 261 if (scope()->is_function_scope() && scope()->function() != NULL) { | 262 if (scope()->is_function_scope() && scope()->function() != NULL) { |
| 262 EmitDeclaration(scope()->function(), Variable::CONST, NULL); | 263 EmitDeclaration(scope()->function(), Variable::CONST, NULL); |
| 263 } | 264 } |
| 264 VisitDeclarations(scope()->declarations()); | 265 VisitDeclarations(scope()->declarations()); |
| 265 } | 266 } |
| 266 | 267 |
| 267 { Comment cmnt(masm_, "[ Stack check"); | 268 { Comment cmnt(masm_, "[ Stack check"); |
| 268 PrepareForBailoutForId(AstNode::kFunctionEntryId, NO_REGISTERS); | 269 PrepareForBailoutForId(AstNode::kDeclarationsId, NO_REGISTERS); |
| 269 Label ok; | 270 Label ok; |
| 270 ExternalReference stack_limit = | 271 ExternalReference stack_limit = |
| 271 ExternalReference::address_of_stack_limit(isolate()); | 272 ExternalReference::address_of_stack_limit(isolate()); |
| 272 __ cmp(esp, Operand::StaticVariable(stack_limit)); | 273 __ cmp(esp, Operand::StaticVariable(stack_limit)); |
| 273 __ j(above_equal, &ok, Label::kNear); | 274 __ j(above_equal, &ok, Label::kNear); |
| 274 StackCheckStub stub; | 275 StackCheckStub stub; |
| 275 __ CallStub(&stub); | 276 __ CallStub(&stub); |
| 276 __ bind(&ok); | 277 __ bind(&ok); |
| 277 } | 278 } |
| 278 | 279 |
| (...skipping 3981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4260 __ add(Operand(edx), Immediate(masm_->CodeObject())); | 4261 __ add(Operand(edx), Immediate(masm_->CodeObject())); |
| 4261 __ jmp(Operand(edx)); | 4262 __ jmp(Operand(edx)); |
| 4262 } | 4263 } |
| 4263 | 4264 |
| 4264 | 4265 |
| 4265 #undef __ | 4266 #undef __ |
| 4266 | 4267 |
| 4267 } } // namespace v8::internal | 4268 } } // namespace v8::internal |
| 4268 | 4269 |
| 4269 #endif // V8_TARGET_ARCH_IA32 | 4270 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |