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

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: finish addressing review comments 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
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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 const Immediate raw_null =
865 Immediate(reinterpret_cast<intptr_t>(Object::null())); 865 Immediate(reinterpret_cast<intptr_t>(Object::null()));
866 __ movl(CTX, raw_null); 866 __ StoreIntoObjectNoBarrier(EAX,
867 FieldAddress(EAX, Context::parent_offset()),
868 raw_null);
869 } else {
870 // Chain the new context in EAX to its parent in CTX.
871 __ StoreIntoObject(EAX, FieldAddress(EAX, Context::parent_offset()), CTX);
867 } 872 }
868 873
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. 874 // Set new context as current context.
872 __ movl(CTX, EAX); 875 __ movl(CTX, EAX);
873 set_context_level(scope->context_level()); 876 set_context_level(scope->context_level());
874 877
875 // If this node_sequence is the body of the function being compiled, copy 878 // If this node_sequence is the body of the function being compiled, copy
876 // the captured parameters from the frame into the context. 879 // the captured parameters from the frame into the context.
877 if (node_sequence == parsed_function_.node_sequence()) { 880 if (node_sequence == parsed_function_.node_sequence()) {
878 ASSERT(scope->context_level() == 1); 881 ASSERT(scope->context_level() == 1);
879 const Immediate raw_null = 882 const Immediate raw_null =
880 Immediate(reinterpret_cast<intptr_t>(Object::null())); 883 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( 2946 const Error& error = Error::Handle(
2944 Parser::FormatError(script, token_index, "Error", format, args)); 2947 Parser::FormatError(script, token_index, "Error", format, args));
2945 va_end(args); 2948 va_end(args);
2946 Isolate::Current()->long_jump_base()->Jump(1, error); 2949 Isolate::Current()->long_jump_base()->Jump(1, error);
2947 UNREACHABLE(); 2950 UNREACHABLE();
2948 } 2951 }
2949 2952
2950 } // namespace dart 2953 } // namespace dart
2951 2954
2952 #endif // defined TARGET_ARCH_IA32 2955 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698