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

Side by Side Diff: vm/intermediate_language_x64.cc

Issue 11519006: Add read only handles for the following predefined symbols (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/intermediate_language_ia32.cc ('k') | vm/object.h » ('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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 intptr_t deopt_id, 347 intptr_t deopt_id,
348 intptr_t token_pos, 348 intptr_t token_pos,
349 Token::Kind kind, 349 Token::Kind kind,
350 LocationSummary* locs, 350 LocationSummary* locs,
351 const ICData& original_ic_data) { 351 const ICData& original_ic_data) {
352 if (!compiler->is_optimizing()) { 352 if (!compiler->is_optimizing()) {
353 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, 353 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
354 deopt_id, 354 deopt_id,
355 token_pos); 355 token_pos);
356 } 356 }
357 const String& operator_name = String::ZoneHandle(Symbols::EqualOperator());
358 const int kNumberOfArguments = 2; 357 const int kNumberOfArguments = 2;
359 const Array& kNoArgumentNames = Array::Handle(); 358 const Array& kNoArgumentNames = Array::Handle();
360 const int kNumArgumentsChecked = 2; 359 const int kNumArgumentsChecked = 2;
361 360
362 const Immediate raw_null = 361 const Immediate raw_null =
363 Immediate(reinterpret_cast<intptr_t>(Object::null())); 362 Immediate(reinterpret_cast<intptr_t>(Object::null()));
364 Label check_identity; 363 Label check_identity;
365 __ cmpq(Address(RSP, 0 * kWordSize), raw_null); 364 __ cmpq(Address(RSP, 0 * kWordSize), raw_null);
366 __ j(EQUAL, &check_identity); 365 __ j(EQUAL, &check_identity);
367 __ cmpq(Address(RSP, 1 * kWordSize), raw_null); 366 __ cmpq(Address(RSP, 1 * kWordSize), raw_null);
368 __ j(EQUAL, &check_identity); 367 __ j(EQUAL, &check_identity);
369 368
370 ICData& equality_ic_data = ICData::ZoneHandle(original_ic_data.raw()); 369 ICData& equality_ic_data = ICData::ZoneHandle(original_ic_data.raw());
371 if (compiler->is_optimizing() && FLAG_propagate_ic_data) { 370 if (compiler->is_optimizing() && FLAG_propagate_ic_data) {
372 ASSERT(!original_ic_data.IsNull()); 371 ASSERT(!original_ic_data.IsNull());
373 if (original_ic_data.NumberOfChecks() == 0) { 372 if (original_ic_data.NumberOfChecks() == 0) {
374 // IC call for reoptimization populates original ICData. 373 // IC call for reoptimization populates original ICData.
375 equality_ic_data = original_ic_data.raw(); 374 equality_ic_data = original_ic_data.raw();
376 } else { 375 } else {
377 // Megamorphic call. 376 // Megamorphic call.
378 equality_ic_data = original_ic_data.AsUnaryClassChecks(); 377 equality_ic_data = original_ic_data.AsUnaryClassChecks();
379 } 378 }
380 } else { 379 } else {
381 equality_ic_data = ICData::New(compiler->parsed_function().function(), 380 equality_ic_data = ICData::New(compiler->parsed_function().function(),
382 operator_name, 381 Symbols::EqualOperatorHandle(),
383 deopt_id, 382 deopt_id,
384 kNumArgumentsChecked); 383 kNumArgumentsChecked);
385 } 384 }
386 compiler->GenerateInstanceCall(deopt_id, 385 compiler->GenerateInstanceCall(deopt_id,
387 token_pos, 386 token_pos,
388 kNumberOfArguments, 387 kNumberOfArguments,
389 kNoArgumentNames, 388 kNoArgumentNames,
390 locs, 389 locs,
391 equality_ic_data); 390 equality_ic_data);
392 Label check_ne; 391 Label check_ne;
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 2435
2437 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2436 void ShiftMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2438 UNIMPLEMENTED(); 2437 UNIMPLEMENTED();
2439 } 2438 }
2440 2439
2441 } // namespace dart 2440 } // namespace dart
2442 2441
2443 #undef __ 2442 #undef __
2444 2443
2445 #endif // defined TARGET_ARCH_X64 2444 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « vm/intermediate_language_ia32.cc ('k') | vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698