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

Unified Diff: test/cctest/parsing/test-parse-decision.cc

Issue 2547483002: Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID (Closed)
Patch Set: updates Created 4 years 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
Index: test/cctest/parsing/test-parse-decision.cc
diff --git a/test/cctest/parsing/test-parse-decision.cc b/test/cctest/parsing/test-parse-decision.cc
index ed90fac555334b7f8d96903832119ec3d0d1b5eb..4e7d65936fc9e6b7223c8d4e99bea89c351b4042 100644
--- a/test/cctest/parsing/test-parse-decision.cc
+++ b/test/cctest/parsing/test-parse-decision.cc
@@ -31,8 +31,12 @@ void GetTopLevelFunctionInfo(
Handle<Script> i_script =
handle(Script::cast(toplevel_fn->shared()->script()));
- WeakFixedArray::Iterator iter(i_script->shared_function_infos());
- while (SharedFunctionInfo* shared = iter.Next<SharedFunctionInfo>()) {
+ for (int index = 0; index < i_script->shared_function_infos()->length();
+ ++index) {
+ Object* raw = i_script->shared_function_infos()->get(index);
+ if (raw->IsSmi()) continue;
+ SharedFunctionInfo* shared =
+ SharedFunctionInfo::cast(WeakCell::cast(raw)->value());
std::unique_ptr<char[]> name = String::cast(shared->name())->ToCString();
is_compiled->insert(std::make_pair(name.get(), shared->is_compiled()));
}

Powered by Google App Engine
This is Rietveld 408576698