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

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

Issue 1737693003: - Remove Isolate::Flags structure and store flags directly in isolate. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 static void EmitAssertBoolean(Register reg, 240 static void EmitAssertBoolean(Register reg,
241 TokenPosition token_pos, 241 TokenPosition token_pos,
242 intptr_t deopt_id, 242 intptr_t deopt_id,
243 LocationSummary* locs, 243 LocationSummary* locs,
244 FlowGraphCompiler* compiler) { 244 FlowGraphCompiler* compiler) {
245 // Check that the type of the value is allowed in conditional context. 245 // Check that the type of the value is allowed in conditional context.
246 // Call the runtime if the object is not bool::true or bool::false. 246 // Call the runtime if the object is not bool::true or bool::false.
247 ASSERT(locs->always_calls()); 247 ASSERT(locs->always_calls());
248 Label done; 248 Label done;
249 249
250 if (Isolate::Current()->flags().type_checks()) { 250 if (Isolate::Current()->type_checks()) {
251 __ CompareObject(reg, Bool::True()); 251 __ CompareObject(reg, Bool::True());
252 __ j(EQUAL, &done, Assembler::kNearJump); 252 __ j(EQUAL, &done, Assembler::kNearJump);
253 __ CompareObject(reg, Bool::False()); 253 __ CompareObject(reg, Bool::False());
254 __ j(EQUAL, &done, Assembler::kNearJump); 254 __ j(EQUAL, &done, Assembler::kNearJump);
255 } else { 255 } else {
256 ASSERT(Isolate::Current()->flags().asserts()); 256 ASSERT(Isolate::Current()->asserts());
257 __ CompareObject(reg, Object::null_instance()); 257 __ CompareObject(reg, Object::null_instance());
258 __ j(NOT_EQUAL, &done, Assembler::kNearJump); 258 __ j(NOT_EQUAL, &done, Assembler::kNearJump);
259 } 259 }
260 260
261 __ pushl(reg); // Push the source object. 261 __ pushl(reg); // Push the source object.
262 compiler->GenerateRuntimeCall(token_pos, 262 compiler->GenerateRuntimeCall(token_pos,
263 deopt_id, 263 deopt_id,
264 kNonBoolTypeErrorRuntimeEntry, 264 kNonBoolTypeErrorRuntimeEntry,
265 1, 265 1,
266 locs); 266 locs);
(...skipping 6565 matching lines...) Expand 10 before | Expand all | Expand 10 after
6832 __ Drop(1); 6832 __ Drop(1);
6833 __ popl(result); 6833 __ popl(result);
6834 } 6834 }
6835 6835
6836 6836
6837 } // namespace dart 6837 } // namespace dart
6838 6838
6839 #undef __ 6839 #undef __
6840 6840
6841 #endif // defined TARGET_ARCH_IA32 6841 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698