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

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: changes 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
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 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 =
1420 InstanceFormat::instance_format(2, InstanceFormat::FOREIGN_MARKER); 1420 InstanceFormat::instance_format(1,
1421 foreign_class_ = Class::cast( 1421 InstanceFormat::FOREIGNFUNCTION_MARKER);
1422 foreignfunction_class_ = Class::cast(
1422 heap()->CreateClass(format, meta_class_, null_object_)); 1423 heap()->CreateClass(format, meta_class_, null_object_));
1423 } 1424 }
1424 1425
1426 {
1427 InstanceFormat format =
1428 InstanceFormat::instance_format(2,
1429 InstanceFormat::FOREIGNMEMORY_MARKER);
1430 foreignmemory_class_ = Class::cast(
1431 heap()->CreateClass(format, meta_class_, null_object_));
1432 }
1433
1425 { 1434 {
1426 InstanceFormat format = InstanceFormat::initializer_format(); 1435 InstanceFormat format = InstanceFormat::initializer_format();
1427 initializer_class_ = Class::cast( 1436 initializer_class_ = Class::cast(
1428 heap()->CreateClass(format, meta_class_, null_object_)); 1437 heap()->CreateClass(format, meta_class_, null_object_));
1429 } 1438 }
1430 1439
1431 { 1440 {
1432 InstanceFormat format = InstanceFormat::instance_format(1); 1441 InstanceFormat format = InstanceFormat::instance_format(1);
1433 constant_list_class_ = Class::cast( 1442 constant_list_class_ = Class::cast(
1434 heap()->CreateClass(format, meta_class_, null_object_)); 1443 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; 1601 if (entry->get(3) != NULL) continue;
1593 Object* target = entry->get(2); 1602 Object* target = entry->get(2);
1594 if (target == NULL) continue; 1603 if (target == NULL) continue;
1595 Function* method = Function::cast(target); 1604 Function* method = Function::cast(target);
1596 Object* intrinsic = reinterpret_cast<Object*>(method->ComputeIntrinsic()); 1605 Object* intrinsic = reinterpret_cast<Object*>(method->ComputeIntrinsic());
1597 entry->set(3, intrinsic); 1606 entry->set(3, intrinsic);
1598 } 1607 }
1599 } 1608 }
1600 1609
1601 } // namespace fletch 1610 } // namespace fletch
OLDNEW
« src/vm/object.h ('K') | « src/vm/program.h ('k') | src/vm/session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698