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

Unified Diff: runtime/vm/code_generator_test.cc

Issue 10786003: Ensure objects emitted in code are allocated in old space. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/bigint_operations.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_test.cc
diff --git a/runtime/vm/code_generator_test.cc b/runtime/vm/code_generator_test.cc
index 7c080cf150ce4baa8242b0521dd881f064bf13b8..61bc5c0799d3932b79a7864c6f975b648a09ef4e 100644
--- a/runtime/vm/code_generator_test.cc
+++ b/runtime/vm/code_generator_test.cc
@@ -24,7 +24,7 @@ static const intptr_t kPos = Scanner::kDummyTokenIndex;
// Helper to allocate and return a LocalVariable.
static LocalVariable* NewTestLocalVariable(const char* name) {
- const String& variable_name = String::ZoneHandle(String::New(name));
+ const String& variable_name = String::ZoneHandle(String::NewSymbol(name));
const Type& variable_type = Type::ZoneHandle(Type::DynamicType());
return new LocalVariable(kPos, variable_name, variable_type);
}
@@ -129,10 +129,12 @@ CODEGEN_TEST_RUN(SmiAddCodegen, Smi::New(5))
CODEGEN_TEST_GENERATE(GenericAddCodegen, test) {
SequenceNode* node_seq = test->node_sequence();
- LiteralNode* a = new LiteralNode(kPos, Double::ZoneHandle(Double::New(12.2)));
+ LiteralNode* a =
+ new LiteralNode(kPos, Double::ZoneHandle(Double::New(12.2, Heap::kOld)));
LiteralNode* b = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(2)));
BinaryOpNode* add_node_1 = new BinaryOpNode(kPos, Token::kADD, a, b);
- LiteralNode* c = new LiteralNode(kPos, Double::ZoneHandle(Double::New(0.8)));
+ LiteralNode* c =
+ new LiteralNode(kPos, Double::ZoneHandle(Double::New(0.8, Heap::kOld)));
BinaryOpNode* add_node_2 = new BinaryOpNode(kPos, Token::kADD, add_node_1, c);
node_seq->Add(new ReturnNode(kPos, add_node_2));
}
@@ -179,9 +181,11 @@ CODEGEN_TEST_RUN(BoolAndCodegen, Bool::False())
CODEGEN_TEST_GENERATE(BinaryOpCodegen, test) {
SequenceNode* node_seq = test->node_sequence();
- LiteralNode* a = new LiteralNode(kPos, Double::ZoneHandle(Double::New(12)));
+ LiteralNode* a =
+ new LiteralNode(kPos, Double::ZoneHandle(Double::New(12, Heap::kOld)));
LiteralNode* b = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(2)));
- LiteralNode* c = new LiteralNode(kPos, Double::ZoneHandle(Double::New(0.5)));
+ LiteralNode* c =
+ new LiteralNode(kPos, Double::ZoneHandle(Double::New(0.5, Heap::kOld)));
BinaryOpNode* sub_node = new BinaryOpNode(kPos, Token::kSUB, a, b);
BinaryOpNode* mul_node = new BinaryOpNode(kPos, Token::kMUL, sub_node, c);
BinaryOpNode* div_node = new BinaryOpNode(kPos, Token::kDIV, mul_node, b);
@@ -251,7 +255,8 @@ CODEGEN_TEST_RUN(SmiUnaryOpCodegen, Smi::New(-12))
CODEGEN_TEST_GENERATE(DoubleUnaryOpCodegen, test) {
SequenceNode* node_seq = test->node_sequence();
- LiteralNode* a = new LiteralNode(kPos, Double::ZoneHandle(Double::New(12.0)));
+ LiteralNode* a =
+ new LiteralNode(kPos, Double::ZoneHandle(Double::New(12.0, Heap::kOld)));
UnaryOpNode* neg_node = new UnaryOpNode(kPos, Token::kSUB, a);
node_seq->Add(new ReturnNode(kPos, neg_node));
}
« no previous file with comments | « runtime/vm/bigint_operations.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698