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

Side by Side Diff: bleeding_edge/src/execution.cc

Issue 501148: The number of heap slots stored in a scope includes the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years 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 | « bleeding_edge/src/contexts.cc ('k') | bleeding_edge/src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 // Convert calls on global objects to be calls on the global 74 // Convert calls on global objects to be calls on the global
75 // receiver instead to avoid having a 'this' pointer which refers 75 // receiver instead to avoid having a 'this' pointer which refers
76 // directly to a global object. 76 // directly to a global object.
77 if (receiver->IsGlobalObject()) { 77 if (receiver->IsGlobalObject()) {
78 Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver); 78 Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver);
79 receiver = Handle<JSObject>(global->global_receiver()); 79 receiver = Handle<JSObject>(global->global_receiver());
80 } 80 }
81 81
82 // Make sure that the global object of the context we're about to
83 // make the current one is indeed a global object.
84 ASSERT(func->context()->global()->IsGlobalObject());
85
82 { 86 {
83 // Save and restore context around invocation and block the 87 // Save and restore context around invocation and block the
84 // allocation of handles without explicit handle scopes. 88 // allocation of handles without explicit handle scopes.
85 SaveContext save; 89 SaveContext save;
86 NoHandleAllocation na; 90 NoHandleAllocation na;
87 JSEntryFunction entry = FUNCTION_CAST<JSEntryFunction>(code->entry()); 91 JSEntryFunction entry = FUNCTION_CAST<JSEntryFunction>(code->entry());
88 92
89 // Call the function through the right JS entry stub. 93 // Call the function through the right JS entry stub.
90 byte* entry_address= func->code()->entry(); 94 byte* entry_address= func->code()->entry();
91 JSFunction* function = *func; 95 JSFunction* function = *func;
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 // All allocation spaces other than NEW_SPACE have the same effect. 692 // All allocation spaces other than NEW_SPACE have the same effect.
689 Heap::CollectAllGarbage(false); 693 Heap::CollectAllGarbage(false);
690 return v8::Undefined(); 694 return v8::Undefined();
691 } 695 }
692 696
693 697
694 static GCExtension kGCExtension; 698 static GCExtension kGCExtension;
695 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); 699 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension);
696 700
697 } } // namespace v8::internal 701 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « bleeding_edge/src/contexts.cc ('k') | bleeding_edge/src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698