Skip to content

Commit

Permalink
Revert "[vm, interpreter] Invoke field as a bytecode."
Browse files Browse the repository at this point in the history
This reverts commit c856313.

Reason for revert: precompilation build failure

Original change's description:
> [vm, interpreter] Invoke field as a bytecode.
> 
> Simplify invocation.
> 
> Change-Id: I2d605d5f2f17e0e98499a19b9d9b6059682100b5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99884
> Reviewed-by: Régis Crelier <regis@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,regis@google.com

Change-Id: If417cb83e55e392895cdbdd263757f3e877f5ee5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99961
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
  • Loading branch information
rmacnak-google authored and commit-bot@chromium.org committed Apr 19, 2019
1 parent c856313 commit 3d1ca4a
Show file tree
Hide file tree
Showing 7 changed files with 253 additions and 264 deletions.
3 changes: 0 additions & 3 deletions runtime/vm/clustered_snapshot.cc
Expand Up @@ -4695,8 +4695,6 @@ void Serializer::AddVMIsolateBaseObjects() {
"<method extractor>");
AddBaseObject(Object::invoke_closure_bytecode().raw(), "Bytecode",
"<invoke closure>");
AddBaseObject(Object::invoke_field_bytecode().raw(), "Bytecode",
"<invoke field>");

for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i],
Expand Down Expand Up @@ -5157,7 +5155,6 @@ void Deserializer::AddVMIsolateBaseObjects() {
AddBaseObject(Object::implicit_static_getter_bytecode().raw());
AddBaseObject(Object::method_extractor_bytecode().raw());
AddBaseObject(Object::invoke_closure_bytecode().raw());
AddBaseObject(Object::invoke_field_bytecode().raw());

for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i]);
Expand Down
7 changes: 3 additions & 4 deletions runtime/vm/compiler/frontend/bytecode_reader.cc
Expand Up @@ -68,11 +68,10 @@ void BytecodeMetadataHelper::ReadMetadata(const Function& function) {
function.AttachBytecode(Object::method_extractor_bytecode());
return;
case RawFunction::kInvokeFieldDispatcher:
if (Class::Handle(function.Owner()).id() == kClosureCid) {
function.AttachBytecode(Object::invoke_closure_bytecode());
} else {
function.AttachBytecode(Object::invoke_field_bytecode());
if (Class::Handle(function.Owner()).id() != kClosureCid) {
break;
}
function.AttachBytecode(Object::invoke_closure_bytecode());
return;
default: {
}
Expand Down
7 changes: 1 addition & 6 deletions runtime/vm/constants_kbc.h
Expand Up @@ -526,19 +526,14 @@ namespace dart {
V(CompareDoubleGe, 0, ___, ___, ___) \
V(CompareDoubleLe, 0, ___, ___, ___) \

// These bytecodes are only generated within the VM. Reassigning their
// These bytecodes are only generated within the VM. Reassinging their
// opcodes is not a breaking change.
#define INTERNAL_KERNEL_BYTECODES_LIST(V) \
V(VMInternal_ImplicitGetter, 0, ___, ___, ___) \
V(VMInternal_ImplicitSetter, 0, ___, ___, ___) \
V(VMInternal_ImplicitStaticGetter, 0, ___, ___, ___) \
V(VMInternal_MethodExtractor, 0, ___, ___, ___) \
V(VMInternal_InvokeClosure, 0, ___, ___, ___) \
V(VMInternal_InvokeField, 0, ___, ___, ___) \
V(VMInternal_ForwardDynamicInvocation, 0, ___, ___, ___) \
V(VMInternal_DispatchNoSuchMethod, 0, ___, ___, ___) \
V(VMInternal_ImplicitStaticClosure, 0, ___, ___, ___) \
V(VMInternal_ImplicitInstanceClosure, 0, ___, ___, ___) \

#define KERNEL_BYTECODES_LIST(V) \
PUBLIC_KERNEL_BYTECODES_LIST(V) \
Expand Down

0 comments on commit 3d1ca4a

Please sign in to comment.