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

Side by Side Diff: src/debug/debug-evaluate.cc

Issue 2629143002: [runtime] Remove SharedFunctionInfo::is_function which is the inverse of SFI::is_toplevel (Closed)
Patch Set: Also remove is_function from FunctionLiteral Created 3 years, 11 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
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/debug/debug-evaluate.h" 5 #include "src/debug/debug-evaluate.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/contexts.h" 9 #include "src/contexts.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 element.scope_info); 212 element.scope_info);
213 } 213 }
214 } 214 }
215 } 215 }
216 216
217 217
218 void DebugEvaluate::ContextBuilder::MaterializeArgumentsObject( 218 void DebugEvaluate::ContextBuilder::MaterializeArgumentsObject(
219 Handle<JSObject> target, Handle<JSFunction> function) { 219 Handle<JSObject> target, Handle<JSFunction> function) {
220 // Do not materialize the arguments object for eval or top-level code. 220 // Do not materialize the arguments object for eval or top-level code.
221 // Skip if "arguments" is already taken. 221 // Skip if "arguments" is already taken.
222 if (!function->shared()->is_function()) return; 222 if (function->shared()->is_toplevel()) return;
223 Maybe<bool> maybe = JSReceiver::HasOwnProperty( 223 Maybe<bool> maybe = JSReceiver::HasOwnProperty(
224 target, isolate_->factory()->arguments_string()); 224 target, isolate_->factory()->arguments_string());
225 DCHECK(maybe.IsJust()); 225 DCHECK(maybe.IsJust());
226 if (maybe.FromJust()) return; 226 if (maybe.FromJust()) return;
227 227
228 // FunctionGetArguments can't throw an exception. 228 // FunctionGetArguments can't throw an exception.
229 Handle<JSObject> arguments = Accessors::FunctionGetArguments(function); 229 Handle<JSObject> arguments = Accessors::FunctionGetArguments(function);
230 Handle<String> arguments_str = isolate_->factory()->arguments_string(); 230 Handle<String> arguments_str = isolate_->factory()->arguments_string();
231 JSObject::SetOwnPropertyIgnoreAttributes(target, arguments_str, arguments, 231 JSObject::SetOwnPropertyIgnoreAttributes(target, arguments_str, arguments,
232 NONE) 232 NONE)
(...skipping 11 matching lines...) Expand all
244 return; 244 return;
245 } else if (local_function->shared()->scope_info()->HasReceiver() && 245 } else if (local_function->shared()->scope_info()->HasReceiver() &&
246 !frame_->receiver()->IsTheHole(isolate_)) { 246 !frame_->receiver()->IsTheHole(isolate_)) {
247 recv = handle(frame_->receiver(), isolate_); 247 recv = handle(frame_->receiver(), isolate_);
248 } 248 }
249 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); 249 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check();
250 } 250 }
251 251
252 } // namespace internal 252 } // namespace internal
253 } // namespace v8 253 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698