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

Unified Diff: runtime/vm/object_test.cc

Issue 266783002: Save the entry context for a function that has captured loop variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 33e6c0507511a454644f89c543e211165c7d6dae..45cef4d60e0343cc8947ee56c241c606569b1bc6 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -2361,15 +2361,18 @@ TEST_CASE(ContextScope) {
const int first_frame_index = -1;
LocalScope* loop_owner = parent_scope;
LocalScope* context_owner = NULL; // No context allocated yet.
+ bool found_captured_vars = false;
int next_frame_index = parent_scope->AllocateVariables(first_parameter_index,
num_parameters,
first_frame_index,
loop_owner,
- &context_owner);
+ &context_owner,
+ &found_captured_vars);
EXPECT_EQ(first_frame_index, next_frame_index); // a and c not in frame.
EXPECT_EQ(parent_scope, context_owner); // parent_scope allocated a context.
const intptr_t parent_scope_context_level = 1;
EXPECT_EQ(parent_scope_context_level, parent_scope->context_level());
+ EXPECT(found_captured_vars);
const intptr_t local_scope_context_level = 5;
const ContextScope& context_scope = ContextScope::Handle(
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698