| OLD | NEW | 
|     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/flow_graph_compiler.h" |     8 #include "vm/flow_graph_compiler.h" | 
|     9  |     9  | 
|    10 #include "lib/error.h" |    10 #include "lib/error.h" | 
|    11 #include "vm/ast_printer.h" |    11 #include "vm/ast_printer.h" | 
|    12 #include "vm/il_printer.h" |    12 #include "vm/il_printer.h" | 
|    13 #include "vm/locations.h" |    13 #include "vm/locations.h" | 
|    14 #include "vm/object_store.h" |    14 #include "vm/object_store.h" | 
|    15 #include "vm/parser.h" |    15 #include "vm/parser.h" | 
|    16 #include "vm/stub_code.h" |    16 #include "vm/stub_code.h" | 
 |    17 #include "vm/symbols.h" | 
|    17  |    18  | 
|    18 namespace dart { |    19 namespace dart { | 
|    19  |    20  | 
|    20 DECLARE_FLAG(bool, enable_type_checks); |    21 DECLARE_FLAG(bool, enable_type_checks); | 
|    21 DECLARE_FLAG(bool, print_ast); |    22 DECLARE_FLAG(bool, print_ast); | 
|    22 DECLARE_FLAG(bool, print_scopes); |    23 DECLARE_FLAG(bool, print_scopes); | 
|    23 DECLARE_FLAG(bool, trace_functions); |    24 DECLARE_FLAG(bool, trace_functions); | 
|    24  |    25  | 
|    25  |    26  | 
|    26 void DeoptimizationStub::GenerateCode(FlowGraphCompiler* compiler) { |    27 void DeoptimizationStub::GenerateCode(FlowGraphCompiler* compiler) { | 
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   577   const Immediate raw_null = |   578   const Immediate raw_null = | 
|   578       Immediate(reinterpret_cast<intptr_t>(Object::null())); |   579       Immediate(reinterpret_cast<intptr_t>(Object::null())); | 
|   579   Label is_assignable, runtime_call; |   580   Label is_assignable, runtime_call; | 
|   580   __ cmpl(EAX, raw_null); |   581   __ cmpl(EAX, raw_null); | 
|   581   __ j(EQUAL, &is_assignable); |   582   __ j(EQUAL, &is_assignable); | 
|   582  |   583  | 
|   583   // Generate throw new TypeError() if the type is malformed. |   584   // Generate throw new TypeError() if the type is malformed. | 
|   584   if (dst_type.IsMalformed()) { |   585   if (dst_type.IsMalformed()) { | 
|   585     const Error& error = Error::Handle(dst_type.malformed_error()); |   586     const Error& error = Error::Handle(dst_type.malformed_error()); | 
|   586     const String& error_message = String::ZoneHandle( |   587     const String& error_message = String::ZoneHandle( | 
|   587         String::NewSymbol(error.ToErrorCString())); |   588         Symbols::New(error.ToErrorCString())); | 
|   588     __ PushObject(Object::ZoneHandle());  // Make room for the result. |   589     __ PushObject(Object::ZoneHandle());  // Make room for the result. | 
|   589     __ pushl(EAX);  // Push the source object. |   590     __ pushl(EAX);  // Push the source object. | 
|   590     __ PushObject(dst_name);  // Push the name of the destination. |   591     __ PushObject(dst_name);  // Push the name of the destination. | 
|   591     __ PushObject(error_message); |   592     __ PushObject(error_message); | 
|   592     GenerateCallRuntime(cid, |   593     GenerateCallRuntime(cid, | 
|   593                         token_pos, |   594                         token_pos, | 
|   594                         try_index, |   595                         try_index, | 
|   595                         kMalformedTypeErrorRuntimeEntry); |   596                         kMalformedTypeErrorRuntimeEntry); | 
|   596     // We should never return here. |   597     // We should never return here. | 
|   597     __ int3(); |   598     __ int3(); | 
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1225   __ popl(ECX); |  1226   __ popl(ECX); | 
|  1226   __ popl(EAX); |  1227   __ popl(EAX); | 
|  1227 } |  1228 } | 
|  1228  |  1229  | 
|  1229  |  1230  | 
|  1230 #undef __ |  1231 #undef __ | 
|  1231  |  1232  | 
|  1232 }  // namespace dart |  1233 }  // namespace dart | 
|  1233  |  1234  | 
|  1234 #endif  // defined TARGET_ARCH_IA32 |  1235 #endif  // defined TARGET_ARCH_IA32 | 
| OLD | NEW |