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

Side by Side Diff: runtime/vm/code_generator_ia32.cc

Issue 10536067: Generate code for store buffer updates in open-coded object field stores. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: correct handling of null Created 8 years, 6 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 | « runtime/vm/code_generator.cc ('k') | runtime/vm/intrinsifier_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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/code_generator.h" 8 #include "vm/code_generator.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 GenerateCall(node_sequence->token_index(), &label, PcDescriptors::kOther); 854 GenerateCall(node_sequence->token_index(), &label, PcDescriptors::kOther);
855 855
856 // If this node_sequence is the body of the function being compiled, and if 856 // If this node_sequence is the body of the function being compiled, and if
857 // this function is not a closure, do not link the current context as the 857 // this function is not a closure, do not link the current context as the
858 // parent of the newly allocated context, as it is not accessible. Instead, 858 // parent of the newly allocated context, as it is not accessible. Instead,
859 // save it in a pre-allocated variable and restore it on exit. 859 // save it in a pre-allocated variable and restore it on exit.
860 if ((node_sequence == parsed_function_.node_sequence()) && 860 if ((node_sequence == parsed_function_.node_sequence()) &&
861 (parsed_function_.saved_context_var() != NULL)) { 861 (parsed_function_.saved_context_var() != NULL)) {
862 GenerateStoreVariable( 862 GenerateStoreVariable(
863 *parsed_function_.saved_context_var(), CTX, kNoRegister); 863 *parsed_function_.saved_context_var(), CTX, kNoRegister);
864 const Immediate raw_null = 864 __ StoreIntoObjectNoBarrier(EAX,
865 Immediate(reinterpret_cast<intptr_t>(Object::null())); 865 FieldAddress(EAX, Context::parent_offset()),
866 __ movl(CTX, raw_null); 866 Object::ZoneHandle());
867 } else {
868 // Chain the new context in EAX to its parent in CTX.
869 __ StoreIntoObject(EAX, FieldAddress(EAX, Context::parent_offset()), CTX);
867 } 870 }
868 871
869 // Chain the new context in EAX to its parent in CTX.
870 __ StoreIntoObject(EAX, FieldAddress(EAX, Context::parent_offset()), CTX);
871 // Set new context as current context. 872 // Set new context as current context.
872 __ movl(CTX, EAX); 873 __ movl(CTX, EAX);
873 set_context_level(scope->context_level()); 874 set_context_level(scope->context_level());
874 875
875 // If this node_sequence is the body of the function being compiled, copy 876 // If this node_sequence is the body of the function being compiled, copy
876 // the captured parameters from the frame into the context. 877 // the captured parameters from the frame into the context.
877 if (node_sequence == parsed_function_.node_sequence()) { 878 if (node_sequence == parsed_function_.node_sequence()) {
878 ASSERT(scope->context_level() == 1); 879 ASSERT(scope->context_level() == 1);
879 const Immediate raw_null = 880 const Immediate raw_null =
880 Immediate(reinterpret_cast<intptr_t>(Object::null())); 881 Immediate(reinterpret_cast<intptr_t>(Object::null()));
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2943 const Error& error = Error::Handle( 2944 const Error& error = Error::Handle(
2944 Parser::FormatError(script, token_index, "Error", format, args)); 2945 Parser::FormatError(script, token_index, "Error", format, args));
2945 va_end(args); 2946 va_end(args);
2946 Isolate::Current()->long_jump_base()->Jump(1, error); 2947 Isolate::Current()->long_jump_base()->Jump(1, error);
2947 UNREACHABLE(); 2948 UNREACHABLE();
2948 } 2949 }
2949 2950
2950 } // namespace dart 2951 } // namespace dart
2951 2952
2952 #endif // defined TARGET_ARCH_IA32 2953 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698