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

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

Issue 2517173003: [wasm] Do not create special wrappers for i64 imports on 32-bit platforms (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | 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/compiler/wasm-compiler.h" 5 #include "src/compiler/wasm-compiler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 10
(...skipping 2767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2778 2778
2779 call = graph()->NewNode(jsgraph()->common()->Call(desc), pos, args); 2779 call = graph()->NewNode(jsgraph()->common()->Call(desc), pos, args);
2780 } 2780 }
2781 2781
2782 // Convert the return value back. 2782 // Convert the return value back.
2783 Node* ret; 2783 Node* ret;
2784 Node* val = 2784 Node* val =
2785 FromJS(call, HeapConstant(isolate->native_context()), 2785 FromJS(call, HeapConstant(isolate->native_context()),
2786 sig->return_count() == 0 ? wasm::kAstStmt : sig->GetReturn()); 2786 sig->return_count() == 0 ? wasm::kAstStmt : sig->GetReturn());
2787 Node* pop_size = jsgraph()->Int32Constant(0); 2787 Node* pop_size = jsgraph()->Int32Constant(0);
2788 if (jsgraph()->machine()->Is32() && sig->return_count() > 0 &&
2789 sig->GetReturn() == wasm::kAstI64) {
2790 ret = graph()->NewNode(jsgraph()->common()->Return(), pop_size, val,
2791 graph()->NewNode(jsgraph()->machine()->Word32Sar(),
2792 val, jsgraph()->Int32Constant(31)),
2793 call, start);
2794 } else {
2795 ret = graph()->NewNode(jsgraph()->common()->Return(), pop_size, val, call, 2788 ret = graph()->NewNode(jsgraph()->common()->Return(), pop_size, val, call,
2796 start); 2789 start);
2797 }
2798 2790
2799 MergeControlToEnd(jsgraph(), ret); 2791 MergeControlToEnd(jsgraph(), ret);
2800 } 2792 }
2801 2793
2802 Node* WasmGraphBuilder::MemBuffer(uint32_t offset) { 2794 Node* WasmGraphBuilder::MemBuffer(uint32_t offset) {
2803 DCHECK(module_ && module_->instance); 2795 DCHECK(module_ && module_->instance);
2804 if (offset == 0) { 2796 if (offset == 0) {
2805 if (!mem_buffer_) { 2797 if (!mem_buffer_) {
2806 mem_buffer_ = jsgraph()->RelocatableIntPtrConstant( 2798 mem_buffer_ = jsgraph()->RelocatableIntPtrConstant(
2807 reinterpret_cast<uintptr_t>(module_->instance->mem_start), 2799 reinterpret_cast<uintptr_t>(module_->instance->mem_start),
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
3496 function_->code_start_offset), 3488 function_->code_start_offset),
3497 compile_ms); 3489 compile_ms);
3498 } 3490 }
3499 3491
3500 return code; 3492 return code;
3501 } 3493 }
3502 3494
3503 } // namespace compiler 3495 } // namespace compiler
3504 } // namespace internal 3496 } // namespace internal
3505 } // namespace v8 3497 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698