Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: src/x64/codegen-x64.cc

Issue 536029: Fix a problem with const initialization in the top-level code generator.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } 386 }
387 } 387 }
388 388
389 // Store the arguments object. This must happen after context 389 // Store the arguments object. This must happen after context
390 // initialization because the arguments object may be stored in 390 // initialization because the arguments object may be stored in
391 // the context. 391 // the context.
392 if (ArgumentsMode() != NO_ARGUMENTS_ALLOCATION) { 392 if (ArgumentsMode() != NO_ARGUMENTS_ALLOCATION) {
393 StoreArgumentsObject(true); 393 StoreArgumentsObject(true);
394 } 394 }
395 395
396 // Initialize ThisFunction reference if present.
397 if (scope_->is_function_scope() && scope_->function() != NULL) {
398 frame_->Push(Factory::the_hole_value());
399 StoreToSlot(scope_->function()->slot(), NOT_CONST_INIT);
400 }
401
396 // Generate code to 'execute' declarations and initialize functions 402 // Generate code to 'execute' declarations and initialize functions
397 // (source elements). In case of an illegal redeclaration we need to 403 // (source elements). In case of an illegal redeclaration we need to
398 // handle that instead of processing the declarations. 404 // handle that instead of processing the declarations.
399 if (scope_->HasIllegalRedeclaration()) { 405 if (scope_->HasIllegalRedeclaration()) {
400 Comment cmnt(masm_, "[ illegal redeclarations"); 406 Comment cmnt(masm_, "[ illegal redeclarations");
401 scope_->VisitIllegalRedeclaration(this); 407 scope_->VisitIllegalRedeclaration(this);
402 } else { 408 } else {
403 Comment cmnt(masm_, "[ declarations"); 409 Comment cmnt(masm_, "[ declarations");
404 ProcessDeclarations(scope_->declarations()); 410 ProcessDeclarations(scope_->declarations());
405 // Bail out if a stack-overflow exception occurred when processing 411 // Bail out if a stack-overflow exception occurred when processing
(...skipping 7761 matching lines...) Expand 10 before | Expand all | Expand 10 after
8167 masm.GetCode(&desc); 8173 masm.GetCode(&desc);
8168 // Call the function from C++. 8174 // Call the function from C++.
8169 return FUNCTION_CAST<ModuloFunction>(buffer); 8175 return FUNCTION_CAST<ModuloFunction>(buffer);
8170 } 8176 }
8171 8177
8172 #endif 8178 #endif
8173 8179
8174 #undef __ 8180 #undef __
8175 8181
8176 } } // namespace v8::internal 8182 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698