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

Side by Side Diff: src/interpreter/bytecode-flags.cc

Issue 2135273002: [interpreter] Reduce dependencies in bytecodes.{h,cc} (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix static const Register definitions for bot in roll for Windows. 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/bytecode-flags.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "src/interpreter/bytecode-flags.h"
6
7 #include "src/code-stubs.h"
8
9 namespace v8 {
10 namespace internal {
11 namespace interpreter {
12
13 // static
14 uint8_t CreateObjectLiteralFlags::Encode(bool fast_clone_supported,
15 int properties_count,
16 int runtime_flags) {
17 uint8_t result = FlagsBits::encode(runtime_flags);
18 if (fast_clone_supported) {
19 STATIC_ASSERT(
20 FastCloneShallowObjectStub::kMaximumClonedProperties <=
21 1 << CreateObjectLiteralFlags::FastClonePropertiesCountBits::kShift);
22 DCHECK_LE(properties_count,
23 FastCloneShallowObjectStub::kMaximumClonedProperties);
24 result |= CreateObjectLiteralFlags::FastClonePropertiesCountBits::encode(
25 properties_count);
26 }
27 return result;
28 }
29
30 // static
31 uint8_t CreateClosureFlags::Encode(bool pretenure, bool is_function_scope) {
32 uint8_t result = PretenuredBit::encode(pretenure);
33 if (!FLAG_always_opt && !FLAG_prepare_always_opt &&
34 pretenure == NOT_TENURED && is_function_scope) {
35 result |= FastNewClosureBit::encode(true);
36 }
37 return result;
38 }
39
40 } // namespace interpreter
41 } // namespace internal
42 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-flags.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698