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

Side by Side Diff: src/interpreter/bytecodes.cc

Issue 2113613002: [Interpereter] Inline FastNewClosure into CreateClosure bytecode handler (Closed) Base URL: ssh://rmcilroy.lon.corp.google.com///usr/local/google/code/v8_full/v8@int_context
Patch Set: Rebaseline bytecode expectations Created 4 years, 5 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/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.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/interpreter/bytecodes.h" 5 #include "src/interpreter/bytecodes.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-stubs.h"
10 #include "src/frames.h" 11 #include "src/frames.h"
11 #include "src/interpreter/bytecode-traits.h" 12 #include "src/interpreter/bytecode-traits.h"
12 #include "src/interpreter/interpreter.h" 13 #include "src/interpreter/interpreter.h"
13 14
14 namespace v8 { 15 namespace v8 {
15 namespace internal { 16 namespace internal {
16 namespace interpreter { 17 namespace interpreter {
17 18
18 STATIC_CONST_MEMBER_DEFINITION const int Bytecodes::kMaxOperands; 19 STATIC_CONST_MEMBER_DEFINITION const int Bytecodes::kMaxOperands;
19 20
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 s << "a" << parameter_index - 1; 910 s << "a" << parameter_index - 1;
910 return s.str(); 911 return s.str();
911 } 912 }
912 } else { 913 } else {
913 std::ostringstream s; 914 std::ostringstream s;
914 s << "r" << index(); 915 s << "r" << index();
915 return s.str(); 916 return s.str();
916 } 917 }
917 } 918 }
918 919
920 // static
921 uint8_t CreateObjectLiteralFlags::Encode(bool fast_clone_supported,
922 int properties_count,
923 int runtime_flags) {
924 uint8_t result = FlagsBits::encode(runtime_flags);
925 if (fast_clone_supported) {
926 STATIC_ASSERT(
927 FastCloneShallowObjectStub::kMaximumClonedProperties <=
928 1 << CreateObjectLiteralFlags::FastClonePropertiesCountBits::kShift);
929 DCHECK_LE(properties_count,
930 FastCloneShallowObjectStub::kMaximumClonedProperties);
931 result |= CreateObjectLiteralFlags::FastClonePropertiesCountBits::encode(
932 properties_count);
933 }
934 return result;
935 }
936
937 // static
938 uint8_t CreateClosureFlags::Encode(bool pretenure, bool is_function_scope) {
939 uint8_t result = PretenuredBit::encode(pretenure);
940 if (!FLAG_always_opt && !FLAG_prepare_always_opt &&
941 pretenure == NOT_TENURED && is_function_scope) {
942 result |= FastNewClosureBit::encode(true);
943 }
944 return result;
945 }
946
919 } // namespace interpreter 947 } // namespace interpreter
920 } // namespace internal 948 } // namespace internal
921 } // namespace v8 949 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698