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

Side by Side Diff: src/scopeinfo.cc

Issue 23549011: remove Isolate::Current from most files starting with 's' through 'v' (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | src/scopes.cc » ('j') | src/serialize.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 function_name_info = NONE; 67 function_name_info = NONE;
68 function_variable_mode = VAR; 68 function_variable_mode = VAR;
69 } 69 }
70 70
71 const bool has_function_name = function_name_info != NONE; 71 const bool has_function_name = function_name_info != NONE;
72 const int parameter_count = scope->num_parameters(); 72 const int parameter_count = scope->num_parameters();
73 const int length = kVariablePartIndex 73 const int length = kVariablePartIndex
74 + parameter_count + stack_local_count + 2 * context_local_count 74 + parameter_count + stack_local_count + 2 * context_local_count
75 + (has_function_name ? 2 : 0); 75 + (has_function_name ? 2 : 0);
76 76
77 Factory* factory = Isolate::Current()->factory(); 77 Factory* factory = zone->isolate()->factory();
78 Handle<ScopeInfo> scope_info = factory->NewScopeInfo(length); 78 Handle<ScopeInfo> scope_info = factory->NewScopeInfo(length);
79 79
80 // Encode the flags. 80 // Encode the flags.
81 int flags = ScopeTypeField::encode(scope->scope_type()) | 81 int flags = ScopeTypeField::encode(scope->scope_type()) |
82 CallsEvalField::encode(scope->calls_eval()) | 82 CallsEvalField::encode(scope->calls_eval()) |
83 LanguageModeField::encode(scope->language_mode()) | 83 LanguageModeField::encode(scope->language_mode()) |
84 FunctionVariableField::encode(function_name_info) | 84 FunctionVariableField::encode(function_name_info) |
85 FunctionVariableMode::encode(function_variable_mode); 85 FunctionVariableMode::encode(function_variable_mode);
86 scope_info->SetFlags(flags); 86 scope_info->SetFlags(flags);
87 scope_info->SetParameterCount(parameter_count); 87 scope_info->SetParameterCount(parameter_count);
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 } else { 553 } else {
554 ASSERT(var->index() >= 0); 554 ASSERT(var->index() >= 0);
555 info->set_index(i, var->index()); 555 info->set_index(i, var->index());
556 } 556 }
557 } 557 }
558 ASSERT(i == info->length()); 558 ASSERT(i == info->length());
559 return info; 559 return info;
560 } 560 }
561 561
562 } } // namespace v8::internal 562 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/scopes.cc » ('j') | src/serialize.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698