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

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

Issue 353513002: Use range information for optimizing integer boxing and fix bug in range analysis. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
« runtime/vm/object.h ('K') | « runtime/vm/object_test.cc ('k') | no next file » | 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) 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/service.h" 5 #include "vm/service.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 1308
1309 1309
1310 static RawObject* LookupObjectId(Isolate* isolate, 1310 static RawObject* LookupObjectId(Isolate* isolate,
1311 const char* arg, 1311 const char* arg,
1312 bool* error) { 1312 bool* error) {
1313 *error = false; 1313 *error = false;
1314 if (strncmp(arg, "int-", 4) == 0) { 1314 if (strncmp(arg, "int-", 4) == 0) {
1315 arg += 4; 1315 arg += 4;
1316 int64_t value = 0; 1316 int64_t value = 0;
1317 if (!OS::StringToInt64(arg, &value) || 1317 if (!OS::StringToInt64(arg, &value) ||
1318 !Smi::IsValid64(value)) { 1318 !Smi::IsValid(value)) {
1319 *error = true; 1319 *error = true;
1320 return Object::null(); 1320 return Object::null();
1321 } 1321 }
1322 const Integer& obj = 1322 const Integer& obj =
1323 Integer::Handle(isolate, Smi::New(static_cast<intptr_t>(value))); 1323 Integer::Handle(isolate, Smi::New(static_cast<intptr_t>(value)));
1324 return obj.raw(); 1324 return obj.raw();
1325 1325
1326 } else if (strcmp(arg, "bool-true") == 0) { 1326 } else if (strcmp(arg, "bool-true") == 0) {
1327 return Bool::True().raw(); 1327 return Bool::True().raw();
1328 1328
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
2173 while (current != NULL) { 2173 while (current != NULL) {
2174 if (strcmp(name, current->name()) == 0) { 2174 if (strcmp(name, current->name()) == 0) {
2175 return current; 2175 return current;
2176 } 2176 }
2177 current = current->next(); 2177 current = current->next();
2178 } 2178 }
2179 return NULL; 2179 return NULL;
2180 } 2180 }
2181 2181
2182 } // namespace dart 2182 } // namespace dart
OLDNEW
« runtime/vm/object.h ('K') | « runtime/vm/object_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698