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

Unified Diff: src/code.h

Issue 1302293002: Remove code.h header and move ParameterCount class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code.h
diff --git a/src/code.h b/src/code.h
deleted file mode 100644
index a0639e8deb8ae4e946e1e35a330aea03eee7a895..0000000000000000000000000000000000000000
--- a/src/code.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef V8_CODE_H_
-#define V8_CODE_H_
-
-#include "src/allocation.h"
-#include "src/handles.h"
-#include "src/objects.h"
-
-namespace v8 {
-namespace internal {
-
-
-// Wrapper class for passing expected and actual parameter counts as
-// either registers or immediate values. Used to make sure that the
-// caller provides exactly the expected number of parameters to the
-// callee.
-class ParameterCount BASE_EMBEDDED {
- public:
- explicit ParameterCount(Register reg)
- : reg_(reg), immediate_(0) { }
- explicit ParameterCount(int immediate)
- : reg_(no_reg), immediate_(immediate) { }
- explicit ParameterCount(Handle<JSFunction> f)
- : reg_(no_reg),
- immediate_(f->shared()->internal_formal_parameter_count()) {}
-
- bool is_reg() const { return !reg_.is(no_reg); }
- bool is_immediate() const { return !is_reg(); }
-
- Register reg() const {
- DCHECK(is_reg());
- return reg_;
- }
- int immediate() const {
- DCHECK(is_immediate());
- return immediate_;
- }
-
- private:
- const Register reg_;
- const int immediate_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(ParameterCount);
-};
-
-
-} } // namespace v8::internal
-
-#endif // V8_CODE_H_
« no previous file with comments | « BUILD.gn ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698