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

Side by Side Diff: src/vm/program.cc

Issue 1209033003: Work in progres, please take a look and give early feedback if this is the way we want to structure… (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: address comments Created 5 years, 5 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
« no previous file with comments | « src/vm/program.h ('k') | src/vm/session.cc » ('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) 2014, the Fletch project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Fletch 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #include "src/vm/program.h" 5 #include "src/vm/program.h"
6 6
7 // TODO(ager): Implement a self-contained simple hash map. 7 // TODO(ager): Implement a self-contained simple hash map.
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 } 1409 }
1410 1410
1411 { 1411 {
1412 InstanceFormat format = 1412 InstanceFormat format =
1413 InstanceFormat::instance_format(1, InstanceFormat::PORT_MARKER); 1413 InstanceFormat::instance_format(1, InstanceFormat::PORT_MARKER);
1414 port_class_ = Class::cast( 1414 port_class_ = Class::cast(
1415 heap()->CreateClass(format, meta_class_, null_object_)); 1415 heap()->CreateClass(format, meta_class_, null_object_));
1416 } 1416 }
1417 1417
1418 { 1418 {
1419 InstanceFormat format = 1419 InstanceFormat format = InstanceFormat::instance_format(
1420 InstanceFormat::instance_format(2, InstanceFormat::FOREIGN_MARKER); 1420 1, InstanceFormat::FOREIGN_FUNCTION_MARKER);
1421 foreign_class_ = Class::cast( 1421 foreign_function_class_ = Class::cast(
1422 heap()->CreateClass(format, meta_class_, null_object_)); 1422 heap()->CreateClass(format, meta_class_, null_object_));
1423 } 1423 }
1424 1424
1425 {
1426 InstanceFormat format = InstanceFormat::instance_format(
1427 2, InstanceFormat::FOREIGN_MEMORY_MARKER);
1428 foreign_memory_class_ = Class::cast(
1429 heap()->CreateClass(format, meta_class_, null_object_));
1430 }
1431
1425 { 1432 {
1426 InstanceFormat format = InstanceFormat::initializer_format(); 1433 InstanceFormat format = InstanceFormat::initializer_format();
1427 initializer_class_ = Class::cast( 1434 initializer_class_ = Class::cast(
1428 heap()->CreateClass(format, meta_class_, null_object_)); 1435 heap()->CreateClass(format, meta_class_, null_object_));
1429 } 1436 }
1430 1437
1431 { 1438 {
1432 InstanceFormat format = InstanceFormat::instance_format(1); 1439 InstanceFormat format = InstanceFormat::instance_format(1);
1433 constant_list_class_ = Class::cast( 1440 constant_list_class_ = Class::cast(
1434 heap()->CreateClass(format, meta_class_, null_object_)); 1441 heap()->CreateClass(format, meta_class_, null_object_));
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 if (entry->get(3) != NULL) continue; 1599 if (entry->get(3) != NULL) continue;
1593 Object* target = entry->get(2); 1600 Object* target = entry->get(2);
1594 if (target == NULL) continue; 1601 if (target == NULL) continue;
1595 Function* method = Function::cast(target); 1602 Function* method = Function::cast(target);
1596 Object* intrinsic = reinterpret_cast<Object*>(method->ComputeIntrinsic()); 1603 Object* intrinsic = reinterpret_cast<Object*>(method->ComputeIntrinsic());
1597 entry->set(3, intrinsic); 1604 entry->set(3, intrinsic);
1598 } 1605 }
1599 } 1606 }
1600 1607
1601 } // namespace fletch 1608 } // namespace fletch
OLDNEW
« no previous file with comments | « src/vm/program.h ('k') | src/vm/session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698