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

Side by Side Diff: src/wasm/wasm-js.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 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/typing-asm.cc ('k') | src/wasm/wasm-module.cc » ('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/api-natives.h" 5 #include "src/api-natives.h"
6 #include "src/api.h" 6 #include "src/api.h"
7 #include "src/assert-scope.h" 7 #include "src/assert-scope.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/execution.h" 10 #include "src/execution.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 i::Handle<i::Name> name = 238 i::Handle<i::Name> name =
239 factory->NewStringFromStaticChars("__foreign_init__"); 239 factory->NewStringFromStaticChars("__foreign_init__");
240 240
241 i::Handle<i::Object> module_object = maybe_module_object.ToHandleChecked(); 241 i::Handle<i::Object> module_object = maybe_module_object.ToHandleChecked();
242 i::MaybeHandle<i::Object> maybe_init = 242 i::MaybeHandle<i::Object> maybe_init =
243 i::Object::GetProperty(module_object, name); 243 i::Object::GetProperty(module_object, name);
244 DCHECK(!maybe_init.is_null()); 244 DCHECK(!maybe_init.is_null());
245 245
246 i::Handle<i::Object> init = maybe_init.ToHandleChecked(); 246 i::Handle<i::Object> init = maybe_init.ToHandleChecked();
247 i::Handle<i::Object> undefined(isolate->heap()->undefined_value(), isolate); 247 i::Handle<i::Object> undefined = isolate->factory()->undefined_value();
248 i::Handle<i::Object>* foreign_args_array = 248 i::Handle<i::Object>* foreign_args_array =
249 new i::Handle<i::Object>[foreign_args->length()]; 249 new i::Handle<i::Object>[foreign_args->length()];
250 for (int j = 0; j < foreign_args->length(); j++) { 250 for (int j = 0; j < foreign_args->length(); j++) {
251 if (!foreign.is_null()) { 251 if (!foreign.is_null()) {
252 i::MaybeHandle<i::Name> name = i::Object::ToName( 252 i::MaybeHandle<i::Name> name = i::Object::ToName(
253 isolate, i::Handle<i::Object>(foreign_args->get(j), isolate)); 253 isolate, i::Handle<i::Object>(foreign_args->get(j), isolate));
254 if (!name.is_null()) { 254 if (!name.is_null()) {
255 i::MaybeHandle<i::Object> val = 255 i::MaybeHandle<i::Object> val =
256 i::Object::GetProperty(foreign, name.ToHandleChecked()); 256 i::Object::GetProperty(foreign, name.ToHandleChecked());
257 if (!val.is_null()) { 257 if (!val.is_null()) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 int unused_property_fields = in_object_properties - pre_allocated; 363 int unused_property_fields = in_object_properties - pre_allocated;
364 Handle<Map> map = Map::CopyInitialMap( 364 Handle<Map> map = Map::CopyInitialMap(
365 prev_map, instance_size, in_object_properties, unused_property_fields); 365 prev_map, instance_size, in_object_properties, unused_property_fields);
366 366
367 context->set_wasm_function_map(*map); 367 context->set_wasm_function_map(*map);
368 } 368 }
369 } 369 }
370 370
371 } // namespace internal 371 } // namespace internal
372 } // namespace v8 372 } // namespace v8
OLDNEW
« no previous file with comments | « src/typing-asm.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698