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

Side by Side Diff: src/elements-kind.cc

Issue 145133013: External Array renaming and boilerplate scrapping (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 19 matching lines...) Expand all
30 #include "api.h" 30 #include "api.h"
31 #include "elements.h" 31 #include "elements.h"
32 #include "objects.h" 32 #include "objects.h"
33 33
34 namespace v8 { 34 namespace v8 {
35 namespace internal { 35 namespace internal {
36 36
37 37
38 int ElementsKindToShiftSize(ElementsKind elements_kind) { 38 int ElementsKindToShiftSize(ElementsKind elements_kind) {
39 switch (elements_kind) { 39 switch (elements_kind) {
40 case EXTERNAL_BYTE_ELEMENTS: 40 case EXTERNAL_INT8_ELEMENTS:
41 case EXTERNAL_PIXEL_ELEMENTS: 41 case EXTERNAL_UINT8_CLAMPED_ELEMENTS:
42 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 42 case EXTERNAL_UINT8_ELEMENTS:
43 case UINT8_ELEMENTS: 43 case UINT8_ELEMENTS:
44 case INT8_ELEMENTS: 44 case INT8_ELEMENTS:
45 case UINT8_CLAMPED_ELEMENTS: 45 case UINT8_CLAMPED_ELEMENTS:
46 return 0; 46 return 0;
47 case EXTERNAL_SHORT_ELEMENTS: 47 case EXTERNAL_INT16_ELEMENTS:
48 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 48 case EXTERNAL_UINT16_ELEMENTS:
49 case UINT16_ELEMENTS: 49 case UINT16_ELEMENTS:
50 case INT16_ELEMENTS: 50 case INT16_ELEMENTS:
51 return 1; 51 return 1;
52 case EXTERNAL_INT_ELEMENTS: 52 case EXTERNAL_INT32_ELEMENTS:
53 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 53 case EXTERNAL_UINT32_ELEMENTS:
54 case EXTERNAL_FLOAT_ELEMENTS: 54 case EXTERNAL_FLOAT32_ELEMENTS:
55 case UINT32_ELEMENTS: 55 case UINT32_ELEMENTS:
56 case INT32_ELEMENTS: 56 case INT32_ELEMENTS:
57 case FLOAT32_ELEMENTS: 57 case FLOAT32_ELEMENTS:
58 return 2; 58 return 2;
59 case EXTERNAL_DOUBLE_ELEMENTS: 59 case EXTERNAL_FLOAT64_ELEMENTS:
60 case FAST_DOUBLE_ELEMENTS: 60 case FAST_DOUBLE_ELEMENTS:
61 case FAST_HOLEY_DOUBLE_ELEMENTS: 61 case FAST_HOLEY_DOUBLE_ELEMENTS:
62 case FLOAT64_ELEMENTS: 62 case FLOAT64_ELEMENTS:
63 return 3; 63 return 3;
64 case FAST_SMI_ELEMENTS: 64 case FAST_SMI_ELEMENTS:
65 case FAST_ELEMENTS: 65 case FAST_ELEMENTS:
66 case FAST_HOLEY_SMI_ELEMENTS: 66 case FAST_HOLEY_SMI_ELEMENTS:
67 case FAST_HOLEY_ELEMENTS: 67 case FAST_HOLEY_ELEMENTS:
68 case DICTIONARY_ELEMENTS: 68 case DICTIONARY_ELEMENTS:
69 case NON_STRICT_ARGUMENTS_ELEMENTS: 69 case NON_STRICT_ARGUMENTS_ELEMENTS:
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return to_kind == FAST_HOLEY_ELEMENTS; 178 return to_kind == FAST_HOLEY_ELEMENTS;
179 case FAST_HOLEY_ELEMENTS: 179 case FAST_HOLEY_ELEMENTS:
180 return false; 180 return false;
181 default: 181 default:
182 return false; 182 return false;
183 } 183 }
184 } 184 }
185 185
186 186
187 } } // namespace v8::internal 187 } } // namespace v8::internal
OLDNEW
« src/api.cc ('K') | « src/elements-kind.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698