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

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

Issue 8416052: Verify that user classes/interfaces do not extend/implement any of bool, num, (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 __ CompareObject(ECX, bool_class); 1640 __ CompareObject(ECX, bool_class);
1641 __ j(EQUAL, &done, Assembler::kNearJump); 1641 __ j(EQUAL, &done, Assembler::kNearJump);
1642 1642
1643 __ Bind(&runtime_call); 1643 __ Bind(&runtime_call);
1644 const Object& result = Object::ZoneHandle(); 1644 const Object& result = Object::ZoneHandle();
1645 __ PushObject(result); // Make room for the result of the runtime call. 1645 __ PushObject(result); // Make room for the result of the runtime call.
1646 const Immediate location = 1646 const Immediate location =
1647 Immediate(reinterpret_cast<int32_t>(Smi::New(token_index))); 1647 Immediate(reinterpret_cast<int32_t>(Smi::New(token_index)));
1648 __ pushl(location); // Push the source location. 1648 __ pushl(location); // Push the source location.
1649 __ pushl(EAX); // Push the source object. 1649 __ pushl(EAX); // Push the source object.
1650 // TODO(regis): Once we enforce the rule prohibiting subtyping of bool, we 1650 GenerateCallRuntime(token_index, kConditionTypeErrorRuntimeEntry);
1651 // should rename the runtime call 'ConditionTypeCheck' to
1652 // 'ConditionTypeError'.
1653 GenerateCallRuntime(token_index, kConditionTypeCheckRuntimeEntry);
1654 // Pop the parameters supplied to the runtime entry. The result of the 1651 // Pop the parameters supplied to the runtime entry. The result of the
1655 // type check runtime call is the checked value. 1652 // type check runtime call is the checked value.
1656 __ addl(ESP, Immediate(3 * kWordSize)); 1653 __ addl(ESP, Immediate(3 * kWordSize));
1657 1654
1658 __ Bind(&done); 1655 __ Bind(&done);
1659 } 1656 }
1660 1657
1661 1658
1662 void CodeGenerator::VisitComparisonNode(ComparisonNode* node) { 1659 void CodeGenerator::VisitComparisonNode(ComparisonNode* node) {
1663 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); 1660 const Bool& bool_true = Bool::ZoneHandle(Bool::True());
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 const Class& cls = Class::Handle(parsed_function_.function().owner()); 2638 const Class& cls = Class::Handle(parsed_function_.function().owner());
2642 const Script& script = Script::Handle(cls.script()); 2639 const Script& script = Script::Handle(cls.script());
2643 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args); 2640 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args);
2644 Isolate::Current()->long_jump_base()->Jump(1, error_msg); 2641 Isolate::Current()->long_jump_base()->Jump(1, error_msg);
2645 UNREACHABLE(); 2642 UNREACHABLE();
2646 } 2643 }
2647 2644
2648 } // namespace dart 2645 } // namespace dart
2649 2646
2650 #endif // defined TARGET_ARCH_IA32 2647 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698